<meta charset="utf-8">

<div class="box box-primary" id="pmpTasks_expiryTime">
		<div class="box-body">
		<form action="" id="pmpTasks_expiryTime_form">
					 <div class="form-group">
								<label for="title">截止时间</label>  
								<input type='text' class="form-control date form_datetime" id="expiryTime" v-kmdatetime="{vmodel:'expiryTime',format:'yyyy-MM-dd hh:mm:ss'}" v-model="expiryTime" /> 
		                   </div>
					</form>
		</div>
		
		<div class="box-footer">
			<button type="button" class="btn btn-default" v-on:click="cancel">取消</button>
			<button type="button" class="btn btn-info pull-right" v-on:click="doAsign">提交</button>
		</div>
		
</div>
<script type="text/javascript">
	new Vue({
			el : '#pmpTasks_expiryTime',
			data : {
				 projectId: project_detail_main.$data.projectId,
				 taskId: zfesLayerEditDg.getLayerParam().id,
				 expiryTime: zfesLayerEditDg.getLayerParam().expiryTime,
				bus : new Vue()
			},
			mounted : function() {
				var _this = this;
			},
			methods : {
				doAsign : function() {
					if ($("#pmpTasks_expiryTime_form").valid()) {
						var _this = this;
				        var url = "/pmp/service/pm/pmpTasks/updateExpiryTime";
				       zfesAjax.ajaxTodo(url, {"id":_this.taskId,"expiryTime": _this.expiryTime}, function(data) {
				    	   alertSwal.successText(data.message);
							layer.close(layer.index);
				       });
					}
				},
				cancel : function() {
					layer.close(layer.index);
				}
			}
		});
</script>
